<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title></title>
	<link rel="stylesheet" href="../../../../../../guns-base-support/guns-sys/src/main/webapp/assets/common/libs/layui/css/layui.css">
</head>
<body>

<table class="layui-hide" id="test" lay-filter="test"></table>


<script src="../assets/common/libs/layui/layui.all.js"></script>

<script>
layui.use('table', function(){
  var table = layui.table;

  table.render({
    elem: '#test'
	,even: true
	,title: "日程表样式一"
	,toolbar: true
	,defaultToolbar: ['exports']
	,cellMinWidth: 120
    ,cols: [[
      {field:'timeid', title: '时间' ,align: 'center',rowspan: 2}
	  ,{field:'sunday', title: '周日' ,align: 'center',edit:'text'}
      ,{field:'monday', title: '周一',align: 'center',edit:'text'}
      ,{field:'tuesday', title: '周二',align: 'center',edit:'text'}
      ,{field:'wednesday', title: '周三',align: 'center',edit:'text'}
      ,{field:'thursday', title: '周四',align: 'center',edit:'text'}
      ,{field:'friday', title: '周五', align: 'center',edit:'text'}
      ,{field:'saturday', title: '周六',  align: 'center',edit:'text'}
    ]]

    ,data: [
    {
      "timeid": "1"
    ,"sunday": "休息"
    ,"monday": "计算机原理"
    ,"tuesday": "11"
    ,"wednesday": "体育"
    ,"thursday": "11"
    ,"friday": "11"
    ,"saturday":"四六级考试"
    },
    {
      "timeid": "2"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "3"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "4"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "5"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "6"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "7"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "8"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "9"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"march": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    },
    {
      "timeid": "10"
    ,"sunday": ""
    ,"monday": ""
    ,"tuesday": ""
    ,"wednesday": ""
    ,"thursday": ""
    ,"friday": ""
    ,"saturday":""
    }]

    ,response: {
      statusCode: 200 //重新规定成功的状态码为 200，table 组件默认为 0
    }
    ,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
      return {
        "code": res.status, //解析接口状态
        "msg": res.message, //解析提示文本
        "count": res.total, //解析数据长度
        "data": res.rows.item //解析数据列表
      };
    }
  });


});
</script>
</body>
</html>